67073cd7789b602f154b3bb1e6d2fbc4616e1a85,source/src/main/java/org/cerberus/engine/gwt/impl/ActionService.java,ActionService,doActionCallService,#TestCaseStepActionExecution#String#,872
Before Change
} catch (CerberusException ex) {
message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSOAP);
message.setDescription(message.getDescription().replace("%SOAPNAME%", value1));
message.setDescription(message.getDescription().replace("%SERVICEPATH%", decodedServicePath));
message.setDescription(message.getDescription().replace("%DESCRIPTION%", ex.getMessageError().getDescription()));
return message;
} catch (Exception ex) {
After Change
AppService appService = appServiceService.convert(appServiceService.readByKey(value1));
String servicePath;
if (appService == null) {
message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE);
message.setDescription(message.getDescription().replace("%SERVICE%", value1));
message.setDescription(message.getDescription().replace("%DESCRIPTION%", "Service does not exist !!"));
} else {
// We start by calculating the servicePath and decode it.
servicePath = appService.getServicePath();
if (!(StringUtil.isURL(servicePath))) {
// If appService value does not look like an URL, it means it is relative and we add the application host and context root.
servicePath = StringUtil.addSuffixIfNotAlready(tCExecution.getCountryEnvironmentParameters().getIp(), "/");
servicePath += StringUtil.addSuffixIfNotAlready(tCExecution.getCountryEnvironmentParameters().getUrl(), "/");
servicePath += appService.getServicePath();
if (!(StringUtil.isURL(servicePath))) { // If still does not look lke an URL, we add http:// by default.
servicePath = "http://" + servicePath;
}
}
decodedServicePath = servicePath;
try {
if (appService.getServicePath().contains("%")) {
decodedServicePath = variableService.decodeStringCompletly(decodedServicePath, tCExecution, testCaseStepActionExecution, false);
}
//if the process of decoding originates a message that isStopExecution then we will stop the current action execution
if (testCaseStepActionExecution.isStopExecution()) {
return testCaseStepActionExecution.getActionResultMessage();
}
} catch (CerberusEventException cee) {
message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICEWITHPATH);
message.setDescription(message.getDescription().replace("%SERVICE%", value1));
message.setDescription(message.getDescription().replace("%SERVICEPATH%", decodedServicePath));
message.setDescription(message.getDescription().replace("%DESCRIPTION%", cee.getMessageError().getDescription()));
return message;
}